package com.uchengwang.ui.base_ui.ui;

import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

/**
 * Created by U城网 on 2017/6/22.
 * activity含有fragment的继承这个
 */

public class BaseWithTitleFmActivity extends BaseFmActivity{
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }
    public void setLeftTextView(String title, int color, int src, View.OnClickListener onClickListener) {
        titleBar.setLeftView(title, color,src, onClickListener);
    }

    public void setLeftListener(View.OnClickListener listener){
        titleBar.setLeftListener(listener);
    }

    public void setBackVisiable(boolean isVisiable) {
        titleBar.setLeftVisible(isVisiable);
    }


    public void setTitle(String title) {
        titleBar.setTitle(title, 0);
    }

    public void setTitle(String title, int color) {
        titleBar.setTitle(title, color);
    }
    public void setCenterImage(int src, String netUrl){
        titleBar.setCenterImage(this,src,netUrl);
    }


    public void setRightButton(int index,String text,int src, View.OnClickListener listener){
        titleBar.setBTIndexRes(index, text, src, listener);
    }

    public void setRightImage(int res, View.OnClickListener listener){
        titleBar.setImageRight(res, listener);
    }
    public void setRightImage(int width, int res, View.OnClickListener listener){
        titleBar.setImageRightWH(width, res, listener);
    }

    public void setRightText(String text, View.OnClickListener listener){
        titleBar.setRightText(text, listener);
    }
    public TextView getRightText(){
        return titleBar.getRightTV();
    }

    public void setTitleBg(int resId){
        titleBar.setBg(resId);
    }


    @Override
    protected void onDestroy() {
        super.onDestroy();
    }
}
